//
//  HomeTableViewController.swift
//  weibo
//
//  Created by 杨晨 on 16/3/8.
//  Copyright © 2016年 杨晨. All rights reserved.
//

import UIKit
import AFNetworking
import SVProgressHUD 
class HomeTableViewController: BasicController{

    
    
    
    override func viewDidLoad() {
      super.viewDidLoad()
        //设置访客视图信息
        imgeTourist?.setupInfoWith("关注一些人", imageName:nil)
        
        demo()
    }
    
    
    private func demo() {
        
        //使用AFN请求数据
        let AFN = AFHTTPSessionManager()
        
        AFN.responseSerializer.acceptableContentTypes?.insert("text/html")
        
        //GET请求
        SVProgressHUD.show()
        AFN.GET("http://www.weather.com.cn/data/sk/101010100.html", parameters: nil, success: { (task, result) -> Void in
            
            print(result)
            SVProgressHUD.dismiss()
            
            }) { (task, error) -> Void in
                
            print(error)
            SVProgressHUD.showErrorWithStatus("请求失败")
        }
        
        
    }

}
